package com.dc.business.datacollectbusiness.controller;

import com.dc.business.datacollectbusiness.model.Result;
import com.dc.business.datacollectbusiness.model.brandModel;
import com.dc.business.datacollectbusiness.service.brandStateService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/api/AllBrandState")
@CrossOrigin
public class brandStateController {

    @Autowired
    private brandStateService brandStateService;

    // 查询每个厂家前天、昨天的数据
    @GetMapping("/preTwoDayBrandStateList/")
    public Result preTwoDayBrandStateList(@RequestParam(value = "brand", required = true) String brand) {
        return Result.success(brandStateService.preTwoDayBrandStateList(brand));
    }

    // 首页今天数据
    @GetMapping("/todayBrandStateList/")
    public Result todayBrandStateList() {
        return Result.success(brandStateService.todayBrandStateList());
    }
}
